Method Name |
Parameter |
Return Type |
Usage |
Example |
getFilePath |
fileName: String |
String |
To get the file path |
FileUtils.getFilePath(filename) |
setDirectory |
path: String |
void |
To set directory |
FileUtils.setDirectory(path); |
getCurrentDir |
|
String |
To get current directory |
FileUtils.getCurrentDir(); |
createTempDirectory |
folderName:String |
File |
To create temporary directory |
FileUtils.getFilePath(folderName) |
fileCopy |
targetPath:String,destPath:String |
boolean |
To copy file |
FileUtils.fileCopy(targetPath,destPath); |
moveFile |
source:String,dest:String |
void |
To move file |
FileUtils.moveFile(source,dest) |
jarCopy |
targetPath:String,destPath:String |
boolean |
To jar copy |
FileUtils.jarCopy(targetPath,destPath) |
makeDirs |
path:String |
String |
Creates the directory named by this abstract pathname |
FileUtils.makeDirs(path); |
createSimpleFile |
path:String,body:String |
boolean |
To create Simple File |
FileUtils.createSimpleFile(path,body); |
deleteFile |
path:String |
void |
To delete file |
FileUtils.deleteFile(path); |
getFileExtensionFilter |
extension:String |
FilenameFilter |
To get File extension Filter |
FileUtils.getFileExtensionFilter(extension); |
createPropertiesFile |
destPath:String,data:Map<String,String> |
void |
To create properties file |
FileUtils.createPropertiesFile(destPath,data); |
deleteDirectory |
path:File |
void |
To delete directory |
FileUtils.deleteDirectory(dirPath); |
getFileToString |
file:File |
String |
To get file to string |
FileUtils.getFileToString(file); |
getTimeStampFolderPath |
root:String |
String |
To get time stamp folder path |
FileUtils.getTimeStampFolderPath(root) |
createTempFilePath |
folder:String,file:String |
String |
To create temporary file path |
FileUtils.createTempFilePath(folder,file); |
waitforFileDelete |
filename:String,milliseconds:long |
void |
To wait for file delete |
FileUtils.waitforFileDelete(filename,milliseconds); |
waitforFile |
filename:String,milliseconds:long |
void |
To wait for file |
FileUtils.waitforFile(filename,milliseconds); |
getCurrentDirectory |
|
String |
To get current directory |
FileUtils.getCurrentDirectory(); |
copyResourcesToTemp |
root:String,resourcePath:String |
void |
To copy resources to Temp |
FileUtils.copyResourcesToTemp(root,resourcePath); |
getJarDir |
aclass:Class |
File |
To get jar Directory |
FileUtils.getJarDir(); |